

// 放大镜
div1.onmousemove = function(e){
	
	var x = e.clientX-box.offsetLeft;
	var y = e.clientY-box.offsetTop;
	
	x -= glass.offsetWidth/2;
	y -= glass.offsetHeight/2; 
	
	if( x<0 ){x=0}
	if( x>200 ){x=200}	
	if( y<0 ){y=0}
	if( y>200 ){y=200}
	glass.style.left = x+"px";
	glass.style.top = y+"px";
	img2.style.left = x*-2+"px";  
	img2.style.top = y*-2+"px";
}

div1.onmouseover = function(){
	
	startMove(glass, {"opacity":100});
	startMove(div2, {"opacity":100});
}
div1.onmouseout = function(){
	
	startMove(glass, {"opacity":0});
	startMove(div2, {"opacity":0});
}	

  	var imgss = document.querySelectorAll("#div3>#center>#child>img")
  

	for(var i = 0; i < imgss.length; i++) {
		imgss[i].onclick = function() {
			img1.src = img2.src = this.src;
		}
	}	
		
	//		左按钮
//	left.onmousedown = function() {
//		var timer = setInterval(function() {
//			center.scrollLeft -= 3
//		}, 30);
//		left.onmouseup = function() {
//			clearInterval(timer)
//		}
//	}
//	//		右按钮
//	right.onmousedown = function() {
//		var timer1 = setInterval(function() {
//			center.scrollLeft += 3
//		}, 30)
//		right.onmouseup = function() {
//			clearInterval(timer1)
//		}
		

